package com.mall.b2c.plugin.search;

import javax.xml.bind.annotation.XmlRootElement;

/**
 * 选器实体
 * @author wangzx
 */
@XmlRootElement(name="SearchSelector")
public class SearchSelector {
	private String name;
	private Long count;
	private String url;
	private String icon;
	private boolean isSelected;
	private Boolean isTopGoodsCategory;

	public SearchSelector() {
	}

	public SearchSelector(String name, String url, boolean isSelected,
			Boolean isTopGoodsCategory) {
		super();
		this.name = name;
		this.url = url;
		this.isSelected = isSelected;
		this.isTopGoodsCategory = isTopGoodsCategory;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getCount() {
		return count;
	}

	public void setCount(Long count) {
		this.count = count;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public boolean getIsSelected() {
		return isSelected;
	}

	public void setSelected(boolean isSelected) {
		this.isSelected = isSelected;
	}
	
	public Boolean getIsTopGoodsCategory() {
		return isTopGoodsCategory;
	}

	public void setIsTopGoodsCategory(Boolean isTopGoodsCategory) {
		this.isTopGoodsCategory = isTopGoodsCategory;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((url == null) ? 0 : url.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		SearchSelector other = (SearchSelector) obj;
		return other.url != null && url != null && other.url.equals(url);
	}
}
